﻿<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
 <HEAD>
  <TITLE>创建数据表</TITLE>
	<link rel="stylesheet" href="/css/base.css"/>
 	<style type="text/css">
		.header {height:30px; line-height:30px; padding:0px 15px; font-weight:bold; border-bottom:1px solid #ccc; background:#f0f0f0;}		

	</style>
 </HEAD>
<BODY>
<div>
	<div class="list_top_bar">
		<div class="list_top_title"><span style="color:#f00;">注:所有的新建用户表都只存在于"da_userform"库中</span></div>
		<div class="list_top_tools">
			<a class="item" href="javascript:void(0)" onclick="savetable();" ><img src="/images/sys_icon/add.png" /> 保存</a>
		</div>
	</div>
	<table class="tablesolid" style="width:100%">
		<tr>
			<td class="header" style="width:30px;">表名</td>
			<td style="width:230px;"><input id="tbname" style="width:220px;"/></td>
			<td class="header" style="width:30px;">备注</td>
			<td><input id="tbremark" style="width:400px;"/></td>
		</tr>
	</table>
	
	<table class="tablesolid" style="width:100%;margin-top:10px;">
		<thead>
			<tr>
				<td style="width:100px;">字段</td>
				<td style="width:100px;">类型</td>
				<td style="width:60px;">长度</td>
				<td style="width:90px;">默认值</td>
				<td style="width:50px;">可空</td>
				<td style="width:50px;">主键</td>
				<td style="width:50px;">自增</td>
				<td>备注</td>
			</tr>
		</thead>
		<tbody id="itemtemplet">
			<tr style="display:none;">
				<td><input class="fldname" style="width:100px;"/></td>
				<td>
					<select class="fldtype">
						<option value="varchar">Varchar</option>
						<option value="int">Int</option>
						<option value="datetime">DateTime</option>
						<option value="char">Char</option>
						<option value="tinytext">TinyText</option>
						<option value="text">Text</option>
						<option value="bit">Bit</option>
						<option value="bool">Bool</option>
						<option value="tinyint">TinyInt</option>
						<option value="smallint">SmallInt</option>
						<option value="bigint">BigInt</option>
						<option value="float">Float</option>
						<option value="double">Double</option>
						<option value="time">Time</option>
						<option value="timestamp">TimeStamp</option>
						<option value="date">Date</option>
						<option value="year">Year</option>
					</select>
				</td>
				<td><input class="fldlength" style="width:50px;"/></td>
				<td><input class="flddefault" style="width:80px;"/></td>
				<td><input class="fldisvoid" type="checkbox" value="1"/></td>
				<td><input class="fldiskey" type="checkbox" value="1"/></td>
				<td><input class="fldisauto" type="checkbox" value="1"/></td>
				<td><input class="fldremark" style="width:90%;"/></td>
			</tr>
		</tbody>
		<tbody id="itemlist"></tbody>
	</table>
	
	<a href="javascript:void(0)" onclick="additem()">添加字段</a>
</div>
</BODY>
</HTML>


<script type="text/javascript" src="/plugin/da/daLoader_source_1.1.js"></script>
<script type="text/javascript" src="js/table_add_item.js"></script>